import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const web = {
    state: {
        currentTab: "home"
    },
    mutations: {
        setCurrentTab(state, currentTab) {
            state.currentTab = currentTab
        }
    },
    actions: {
        asyncSetCurrentTab(store, currentTab) {
            store.commit('setCurrentTab', currentTab)
        }
    },
    getters: {
        getCurrentTab(state) {
            return state.currentTab
        }
    }
}
export default web;